package edu.tongji.engine.db.dao;

import edu.tongji.engine.def.ProcessDefinition;
import edu.tongji.engine.exe.ProcessInstance;

public interface IProcessDao {

	/*
	 * Process Definition operations
	 * 
	 */
	public ProcessDefinition getProcessDefinition( String processName );
	
	//public ProcessDefinition getProcess( Long processId );
	
	public boolean saveProcessDefition(ProcessDefinition pd);
	
	public boolean deleteProcessDefinition(ProcessDefinition pd);
	
	public boolean deleteProcessDefinition(String processName);
	
	/*
	 * Process Instance operations
	 * 
	 */
	public ProcessInstance getProcessInstance(String name);
	//include create token and context
	public boolean saveProcessInstance(ProcessInstance instance);
	
	public boolean deleteProcessInstance(ProcessInstance instance);
	
	public boolean deleteProcessInstance(String name);
	
	public boolean deleteALlProcessDefinition();
	
}
